refactor(diff): rename diff_opts.layout "inline" to "unified"#295
Merged
Conversation
The shipped `layout = "inline"` renders a unified diff in a separate vsplit pane, not a true in-place virtual-text overlay. Renaming it to "unified" frees the "inline" name for a future real in-place overlay and avoids a breaking rename after release (flagged by @wookayin on #195). The value was added in #195 and is queued for v0.4.0 (release-please breaking change for any released version. "inline" is now rejected by config validation (no deprecated alias) so the name is cleanly reserved; the validation error names "unified" to guide anyone tracking main. Internal implementation names are intentionally left unchanged — they describe the inline-style rendering, not the layout value: - module lua/claudecode/diff_inline.lua and its functions - the claudecode_inline_diff buffer variable - the ClaudeCodeInlineDiff{Add,Delete,AddSign,DeleteSign} highlight groups The user-facing buffer name is updated from "(inline diff)" to "(unified diff)". Refs #293, #195, #82 Change-Id: I66e00ac960ee3de13ffa135b32dcba0cd171c793 Signed-off-by: Thomas Kosiewski <tk@coder.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7 tasks
Member
Author
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the
diff_opts.layout = "inline"option (added in #195, queued for v0.4.0 via release-please #279) to"unified", before it ships in a tagged release. Tracked in #293.@wookayin pointed out that the shipped
"inline"mode isn't a true "inline" diff in the VS Code sense — it renders a unified diff in a separaterightbelow vsplitpane, not an in-place virtual-text overlay in the same window. Naming it"inline"now would force a breaking rename later, once we add the real in-place overlay (the mode that most deserves the name"inline"). Renaming is free now (not yet released) and a breaking change after #279 merges.What changed
"inline"→"unified": validation + error message (config.lua), theClaudeCodeDiffLayouttype alias (types.lua), all four dispatch sites (diff.lua), and the storedlayoutvalue (diff_inline.lua).<file> (inline diff)→<file> (unified diff).CHANGELOG.md[Unreleased]entry forlayout = "unified"."unified"; a new test asserts the former"inline"is rejected.Decisions
"inline"was never in a tagged release, so there's no backward-compat obligation, and rejecting it cleanly reserves the name for the future in-place overlay (diff: add a true in-place "inline" overlay (virtual text) as the future layout = "inline" #294). The validation error names'unified', so anyone trackingmainis pointed at the new value.diff_inline.luamodule, its functions, theclaudecode_inline_diffbuffer variable, and theClaudeCodeInlineDiff*highlight groups are unchanged — they describe the inline-style rendering, not the layout value (diff: reconsiderlayout = "inline"naming before v0.4.0 (reserve "inline" for a true in-place overlay) #293 noted the buffer var can stay). This keeps the diff small and low-risk.main, so the v0.4.0 entry reflects "unified" automatically; I did not hand-edit the bot branch.Validation
mise run all: treefmt clean, luacheck 0/0, 703/703 tests pass (baseline 702 + the new rejection test).layout = "unified"accepted,"inline"rejected (error names'unified'),"vertical"still works.The true in-place overlay (the future
"inline") is tracked in #294.Refs #293, #195, #82
🤖 Generated with Claude Code